
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-user-manager"></use>
                    </svg>
                    <div class="name">管理监测</div>
                    <div class="fontclass">#el-icon-k-user-manager</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-data-repair"></use>
                    </svg>
                    <div class="name">数据维护</div>
                    <div class="fontclass">#el-icon-k-data-repair</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-repair2"></use>
                    </svg>
                    <div class="name">维护</div>
                    <div class="fontclass">#el-icon-k-repair2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-face"></use>
                    </svg>
                    <div class="name">头像</div>
                    <div class="fontclass">#el-icon-k-face</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-management"></use>
                    </svg>
                    <div class="name">管理</div>
                    <div class="fontclass">#el-icon-k-management</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-checkSubmit"></use>
                    </svg>
                    <div class="name">签收</div>
                    <div class="fontclass">#el-icon-k-checkSubmit</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-home3"></use>
                    </svg>
                    <div class="name">首页</div>
                    <div class="fontclass">#el-icon-k-home3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-home2"></use>
                    </svg>
                    <div class="name">首页</div>
                    <div class="fontclass">#el-icon-k-home2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-group"></use>
                    </svg>
                    <div class="name">多级管理</div>
                    <div class="fontclass">#el-icon-k-group</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-workgroup"></use>
                    </svg>
                    <div class="name">工作组信息</div>
                    <div class="fontclass">#el-icon-k-workgroup</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-menu"></use>
                    </svg>
                    <div class="name">菜单</div>
                    <div class="fontclass">#el-icon-k-menu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-cache"></use>
                    </svg>
                    <div class="name">存储</div>
                    <div class="fontclass">#el-icon-k-cache</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-param"></use>
                    </svg>
                    <div class="name">参数</div>
                    <div class="fontclass">#el-icon-k-param</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-approve"></use>
                    </svg>
                    <div class="name">审批流配置</div>
                    <div class="fontclass">#el-icon-k-approve</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-repair"></use>
                    </svg>
                    <div class="name">后台维护</div>
                    <div class="fontclass">#el-icon-k-repair</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-approveSubmit"></use>
                    </svg>
                    <div class="name">审批</div>
                    <div class="fontclass">#el-icon-k-approveSubmit</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-req"></use>
                    </svg>
                    <div class="name">web__API访问</div>
                    <div class="fontclass">#el-icon-k-req</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-safe"></use>
                    </svg>
                    <div class="name">安全保障</div>
                    <div class="fontclass">#el-icon-k-safe</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-add"></use>
                    </svg>
                    <div class="name"> 增加</div>
                    <div class="fontclass">#el-icon-k-add</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-freeze"></use>
                    </svg>
                    <div class="name">冻结</div>
                    <div class="fontclass">#el-icon-k-freeze</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-unfreeze"></use>
                    </svg>
                    <div class="name">解冻</div>
                    <div class="fontclass">#el-icon-k-unfreeze</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-setting2"></use>
                    </svg>
                    <div class="name">管理</div>
                    <div class="fontclass">#el-icon-k-setting2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-counter"></use>
                    </svg>
                    <div class="name">计数器</div>
                    <div class="fontclass">#el-icon-k-counter</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-wkf-agent"></use>
                    </svg>
                    <div class="name">代理</div>
                    <div class="fontclass">#el-icon-k-wkf-agent</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-wkf-record"></use>
                    </svg>
                    <div class="name">流程</div>
                    <div class="fontclass">#el-icon-k-wkf-record</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-role"></use>
                    </svg>
                    <div class="name">角色管理</div>
                    <div class="fontclass">#el-icon-k-role</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-errCod"></use>
                    </svg>
                    <div class="name">错误</div>
                    <div class="fontclass">#el-icon-k-errCod</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-schedular"></use>
                    </svg>
                    <div class="name">班次管理</div>
                    <div class="fontclass">#el-icon-k-schedular</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-user-setting"></use>
                    </svg>
                    <div class="name">人员管理</div>
                    <div class="fontclass">#el-icon-k-user-setting</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-info-setting"></use>
                    </svg>
                    <div class="name">信息维护</div>
                    <div class="fontclass">#el-icon-k-info-setting</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-setting"></use>
                    </svg>
                    <div class="name">管理模式</div>
                    <div class="fontclass">#el-icon-k-setting</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-schedule"></use>
                    </svg>
                    <div class="name">待办</div>
                    <div class="fontclass">#el-icon-k-schedule</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-home"></use>
                    </svg>
                    <div class="name">首页</div>
                    <div class="fontclass">#el-icon-k-home</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-k-common"></use>
                    </svg>
                    <div class="name">公共</div>
                    <div class="fontclass">#el-icon-k-common</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#el-icon-k-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
